package com.yongoe.ecy.firstNode.convert;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yongoe.ecy.firstNode.controller.vo.excel.FirstNodeExcel;
import com.yongoe.ecy.firstNode.controller.vo.req.FirstNodeReq;
import com.yongoe.ecy.firstNode.controller.vo.res.FirstNodeRes;
import com.yongoe.ecy.firstNode.entity.FirstNode;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * 一级节点 convert
 *
 * @author monad
 * @since 2024/03/10
 */
@Mapper(componentModel = "spring")
public interface FirstNodeConvert {
    /**
     * entity to vo
     */
    FirstNodeReq entity2Req(FirstNode entity);

    FirstNodeRes entity2Res(FirstNode entity);

    FirstNodeExcel entity2Excel(FirstNode entity);

    /**
     * entity to vo List
     */
    List<FirstNodeReq> entity2ReqList(List<FirstNode> list);

    List<FirstNodeRes> entity2ResList(List<FirstNode> list);

    List<FirstNodeExcel> entity2ExcelList(List<FirstNode> list);

    /**
     * entity to vo Page
     */
    Page<FirstNodeRes> entity2ResPage(Page<FirstNode> page);

    /**
     * vo to entity
     */
    FirstNode req2Entity(FirstNodeReq req);

    FirstNode excel2Entity(FirstNodeExcel excel);

    /**
     * vo to entity List
     */
    List<FirstNode> excel2EntityList(List<FirstNodeExcel> list);


}